﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WPFRadio
{
	/// <summary>
	/// Logique d'interaction pour ItemAdd.xaml
	/// </summary>
	public partial class ItemAdd : Window 
	{

        public Radio Radio { get; set; }
        public bool DialogResult;
		public ItemAdd()
		{
			this.InitializeComponent();
            DialogResult = false;
			
			// Insérez le code requis pour la création d’objet sous ce point.
		}

        
        public void Dispose()
        {

        }

        private void Window_Activated(object sender, System.EventArgs e)
        {
            


        }

        private void btnOK_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            this.Radio.Name = NameBox.Text;
            this.Radio.Url  = UrlBox.Text;
            this.DialogResult = true;
            this.Close();

        }

        private void btnCancel_Click(object sender, System.Windows.RoutedEventArgs e)
        {
			this.DialogResult = false;
			this.Close();
		}
		

    
	}
}